﻿Imports BUS
Imports DTO
Public Class CapNhatBangThamSo


    Private Sub btnthoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnthoat.Click
        Me.Close()
    End Sub

    Private Sub btncapnhat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncapnhat.Click
        Try
            Dim _TSdto As New CThamSoDTO()
            _TSdto.TuoiToiThieu = Int32.Parse(txttuoitoithieu.Text)
            _TSdto.TuoiToiDa = Int32.Parse(txttuoitoida.Text)
            _TSdto.QuiDinhDat = Int32.Parse(txtquidinhdat.Text)
            Dim _bus As New CThamSoBUS()

            If _bus.CapNhatThamSo(_TSdto) > 0 Then
                MessageBox.Show("Cap Nhat Tham So Thanh Cong")
            Else
                MessageBox.Show("Cap Nhat Tham So That Bai")
            End If
        Catch ex As Exception
            MessageBox.Show("Loi --> " + ex.ToString())
        End Try

    End Sub
End Class